import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/antd'
// import './plugins/iview.js'
import menus from './menu'
import dayjs from 'dayjs'

Vue.config.productionTip = false
Vue.filter('format', function (value, format) {
    return dayjs(value).format(format)
})


let vm = new Vue({
    router,
    store,
    render: h => h(App),
    created() {

        store.dispatch('admin/account/load',false)
    },
    watch: {
        $route: (route) => {
            store.dispatch('admin/menu/mapMenu', route)
        }
    }
}).$mount('#app');
window.vm = vm;
